<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>填写相关资料</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm.min.css">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm-extend.min.css">
    <link rel="stylesheet" href="/static/wx/css/reset.css">
    <link rel="stylesheet" href="/static/wx/css/main.css">
    <link rel="stylesheet" href="/static/wx/css/public_main.css">
</head>

<body>
    <div class="page-group">
        <div class="page page-current" id="">
            <!-- 主内容 -->
            <div class="content">
                <div class="setp-card">
                    <div class="step-box">
                        <div class="step-item selected">
                            <div class="step-item-line"><span></span></div>
                            <div class="step-item-text size-65 text-c">参与竞价</div>
                        </div>
                        <div class="step-item selected">
                            <div class="step-item-line"><span></span></div>
                            <div class="step-item-text size-65 text-c">看货信息</div>
                        </div>
                        <div class="step-item selected">
                            <div class="step-item-line"><span></span></div>
                            <div class="step-item-text size-65 text-c">提货信息</div>
                        </div>
                        <div class="step-item selected">
                            <div class="step-item-line"><span></span></div>
                            <div class="step-item-text size-65 text-c">收款信息</div>
                        </div>
                        <div class="step-item">
                            <div class="step-item-line"><span></span></div>
                            <div class="step-item-text size-65 text-c">递交委托书</div>
                        </div>
                    </div>
                    <div class="size-65 text-c">
                        以下提货信息，将作为拍卖后提货的法律依据
                    </div>
                </div>
                <div class="bs-box">
                    <div class="bs-box-content">
                        <div class="bs-box-inner">
                            <div class="bs-box-content-item">
                                <p class="size-m">您的收款名称</p>
                                <div><input type="text" placeholder="请填写全称" id="pay_name" value="{$info.pay_name | default=''}" class="size-m"></div>
                            </div>
                            <div class="bs-box-content-item">
                                <p class="size-m">开户银行</p>
                                <div><input type="text" placeholder="请填写" id="bank_name" value="{$info.bank_name | default=''}" class="size-m"></div>
                            </div>
                            <div class="bs-box-content-item">
                                <p class="size-m">账号</p>
                                <div><input type="text" placeholder="请填写" id="card_num" value="{$info.card_num | default=''}" class="size-m"></div>
                            </div>
                            <div class="bs-box-content-item">
                                <p class="size-m">税号</p>
                                <div><input type="text" placeholder="请填写" id="tax_num" value="{$info.tax_num | default=''}" class="size-m"></div>
                            </div>
                            <div class="bs-box-content-item">
                                <p class="size-m">单位地址</p>
                                <div><input type="text" placeholder="请填写"  id="company_address" value="{$info.company_address | default=''}" class="size-m"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="btn-box" style="margin-top: 1rem;">
                    <div class="flex">
                        <input type="hidden" id="i_id" value="{$info.i_id | default=''}">
                        <div class="pre-step my-btn" style="width: 47%;"><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);" onclick="window.history.go(-1)">上一步</span></div>
                        <div class="pre-step my-btn" style="width: 47%;"><span class="active" id="submit">下一步</span></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type='text/javascript' src='/static/wx/lib/sui/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm-extend.min.js' charset='utf-8'></script>
    <script>
        $('#submit').on('touchend',function(){
            var i_id = $('#i_id').val();
            var pay_name = $('#pay_name').val();
            var bank_name = $('#bank_name').val();
            var card_num = $('#card_num').val();
            var tax_num = $('#tax_num').val();
            var company_address = $('#company_address').val();

            if (pay_name.length == 0) {
                $.alert('请填写您的收款名称');
                return;
            }
            if (bank_name.length == 0) {
                $.alert('请填写开户银行');
                return;
            }
            if (card_num.length == 0) {
                $.alert('请填写账号');
                return;
            }
            if (tax_num.length == 0) {
                $.alert('请填写税号');
                return;
            }
            if (company_address.length == 0) {
                $.alert('请填写单位地址');
                return;
            }
            $.ajax({
                url:'/wx/insurant/saveBolInfo',
                type:'post',
                dataType:'json',
                data:{
                    'pay_name':pay_name,
                    'bank_name':bank_name,
                    'card_num':card_num,
                    'tax_num':tax_num,
                    'company_address':company_address,
                    'i_id':i_id,
                    'now_status':4
                },
                success:function (data) {
                    if(data.code ==200){
                        window.location.href = '/wx/insurant/step_5?i_id='+i_id;
                    }else{
                        $.alert(data.msg);
                    }
                }
            });
        });
    </script>
    <script>
        var n = $('.step-box').children().length;
        $('.step-item').css('width', document.body.clientWidth / n + 'px')
    </script>
</body>

</html>